

package com.kimo.shop.service;


import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.kimo.shop.bean.app.dto.StationSalesDto;
import com.kimo.shop.bean.model.Station;
import com.kimo.shop.bean.param.OfflineHandleEventAuditParam;
import com.kimo.shop.bean.param.StationDetailParam;
import com.kimo.shop.common.util.PageParam;

import java.util.List;

/**
 * 自提点
 *
 * @author kimo-taozhouchuan
 * @date 2020-04-23 15:18:29
 */
public interface StationService extends IService<Station> {

    IPage<Station> getPage(PageParam<Station> page, Station station);

    void auditApply(Long eventId, Long handleId, String reapplyReason);

    void offline(Station seckill, String offlineReason, Long sysUserId);

    IPage<StationDetailParam> getStationList(Double lat, Double lng, String stationName, Long shopId, String userId, Page page);

    void auditSeckill(OfflineHandleEventAuditParam offlineHandleEventAuditParam, Long sysUserId);

    Station getStationInfoById(Long stationId);

    /**
     * 通过账号名，获取自提点信息
     * @param account
     * @return
     */
    Station getStationInfoByAccount(String account);

    /**
     * 获取自提点的销售数据
     * @param shopId
     * @param stationId
     * @return
     */
    List<StationSalesDto> getStationSalesRecord(Long shopId, Long stationId);

    int insertStation(Station station);

    int updateStation(Station station);

    void changeAccountInfo(Station station);

    int getCountByAccount(String account, Long stationId);

    int removeStationById(Long stationId);

    void removeCacheByStationId(Long stationId);
}
